package com.easy.mapper;

import com.easy.bean.Order;
import com.easy.bean.OrderDetail;
import com.easy.bean.User;
import com.easy.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface OrderDetailMapper {
    int add(@Param("orderDetail") OrderDetail orderDetail) ;
    int del(@Param("id") Integer id) ;
    int finishdel(@Param("orderId") String orderId) ;
    int edit(@Param("orderDetail") OrderDetail orderDetail) ;
    OrderDetail one(@Param("id") Integer id) ;

    List<OrderDetail> all(@Param("reaName") String reaName) ;


    //这两个的@Param("param")参数名是要求必须一样的，否则报错
    int pageCount(@Param("param") OrderDetail orderDetail) ;
    List<OrderDetail> page(@Param("page") Page page, @Param("param") OrderDetail orderDetail) ;

    int commitPageCount(@Param("param") OrderDetail orderDetail,@Param("userId")Integer userId) ;
    List<OrderDetail> commitPage(@Param("page") Page page, @Param("param") OrderDetail orderDetail,@Param("userId")Integer userId) ;

    int cancel(@Param("id") Integer id) ;

    int timeOut(@Param("orderId") String orderId) ;

    int finishPageCount(@Param("param") OrderDetail orderDetail) ;
    List<OrderDetail> finishPage(@Param("page") Page page, @Param("param") OrderDetail orderDetail) ;


}
